﻿@model IEnumerable<Trifecta.Models.Agent_Merchant>

@{
    ViewBag.Title = "Index";
}

<h2>Index</h2>

<p>
    @Html.ActionLink("Create New", "Create")
</p>
<table class="table">
    <tr>
        <th>
            @Html.DisplayNameFor(model => model.Activate_Date)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.Retired_Date)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.Memo)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.Agent.First_Name)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.Merchant.Merchant_Name)
        </th>
        <th></th>
    </tr>

@foreach (var item in Model) {
    <tr>
        <td>
            @Html.DisplayFor(modelItem => item.Activate_Date)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.Retired_Date)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.Memo)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.Agent.First_Name)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.Merchant.Merchant_Name)
        </td>
        <td>
            @Html.ActionLink("Edit", "Edit", new { id=item.AgentMerchant_ID }) |
            @Html.ActionLink("Details", "Details", new { id=item.AgentMerchant_ID }) |
            @Html.ActionLink("Delete", "Delete", new { id=item.AgentMerchant_ID })
        </td>
    </tr>
}

</table>
